*** Do File for Paper ***


***Cumulative ANES***
clear
use "C:\Users\dmac9\Dropbox\Final Accepted Core Values and Elections Pol Psych\Clean Cumulative ANES.dta"

*Table 1*
probit vote_Dem_president c.egal_index01##c.Year_2012_vs_2016 c.mt_index01##c.Year_2012_vs_2016 [pweight=Weight] 
outreg2 using tab.tex, addstat(Pseudo R$^2$, `e(r2_p)') dec(3) replace
probit vote_Dem_president c.egal_index01##c.Year_2012_vs_2016 c.mt_index01##c.Year_2012_vs_2016 pid7_01 ideo7_01 Age Female College White [pweight=Weight] 
outreg2 using tab.tex, addstat(Pseudo R$^2$, `e(r2_p)') dec(3) append 

*Figure 1*
probit vote_Dem_president c.egal_index01##c.Year_2012_vs_2016 c.mt_index01##c.Year_2012_vs_2016 pid7_01 ideo7_01 Age Female College White [pweight=Weight] 
margins, at(egal_index01=(0(.1)1) Year_2012_vs_2016=0) saving(m1, replace)
margins, at(egal_index01=(0(.1)1) Year_2012_vs_2016=1) saving(m2, replace)
combomarginsplot m1 m2

probit vote_Dem_president c.egal_index01##c.Year_2012_vs_2016 c.mt_index01##c.Year_2012_vs_2016 pid7_01 ideo7_01 Age Female College White [pweight=Weight] 
margins, at(mt_index01=(0(.1)1) Year_2012_vs_2016=0) saving(m3, replace)
margins, at(mt_index01=(0(.1)1) Year_2012_vs_2016=1) saving(m4, replace)
combomarginsplot m3 m4

*Table 2*
probit vote_Dem_president c.egal_index01##c.Year_2012_vs_2016 c.mt_index01##c.Year_2012_vs_2016 [pweight=weight] 
outreg2 using tab.tex, addstat(Pseudo R$^2$, `e(r2_p)') dec(3) replace
probit vote_Dem_president c.egal_index01##c.Year_2012_vs_2016 c.mt_index01##c.Year_2012_vs_2016 pid7_01 ideo7_01 Age Female College White [pweight=Weight] 
outreg2 using tab.tex, addstat(Pseudo R$^2$, `e(r2_p)') dec(3) append 

probit vote_Dem_president c.gov_insurance_scale01##c.Year_2012_vs_2016 c.immig_levels01##c.Year_2012_vs_2016 [pweight=weight] 
outreg2 using tab.tex, addstat(Pseudo R$^2$, `e(r2_p)') dec(3) append
probit vote_Dem_president c.gov_insurance_scale01##c.Year_2012_vs_2016 c.immig_levels01##c.Year_2012_vs_2016 pid7_01 ideo7_01 Age Female College White [pweight=Weight]
outreg2 using tab.tex, addstat(Pseudo R$^2$, `e(r2_p)') dec(3) append 

*Table 3*
probit vote_Dem_president c.egal_index01##c.Year_2012_vs_2016 c.mt_index01##c.Year_2012_vs_2016 [pweight=weight] if Very_Interested_Elections==0
outreg2 using tab.tex, addstat(Pseudo R$^2$, `e(r2_p)') dec(3) replace
probit vote_Dem_president c.egal_index01##c.Year_2012_vs_2016 c.mt_index01##c.Year_2012_vs_2016 pid7_01 ideo7_01 Age Female College White [pweight=Weight] if Very_Interested_Elections==0
outreg2 using tab.tex, addstat(Pseudo R$^2$, `e(r2_p)') dec(3) append 

probit vote_Dem_president c.egal_index01##c.Year_2012_vs_2016 c.mt_index01##c.Year_2012_vs_2016 [pweight=Weight] if Very_Interested_Elections==1
outreg2 using tab.tex, addstat(Pseudo R$^2$, `e(r2_p)') dec(3) append
probit vote_Dem_president c.egal_index01##c.Year_2012_vs_2016 c.mt_index01##c.Year_2012_vs_2016 pid7_01 ideo7_01 Age Female College White [pweight=Weight] if Very_Interested_Elections==1
outreg2 using tab.tex, addstat(Pseudo R$^2$, `e(r2_p)') dec(3) append 

***TESS 2005 Survey Experiment***
clear 
use "C:\Users\dmac9\Dropbox\Final Accepted Core Values and Elections Pol Psych\Clean TESS.dta"

*Figure 2*

*Liberty > Economic Security & Equality*
reg Liberty_Q4 Prime_Liberty, r
margins, dydx(Prime_Liberty) saving(m1, replace)
*Liberty > & Economic Security & Morality
reg Liberty_Q7 Prime_Liberty, r
margins, dydx(Prime_Liberty) saving(m2, replace)
*Liberty > Equality & Morality*
reg Liberty_Q8 Prime_Liberty, r
margins, dydx(Prime_Liberty) saving(m3, replace)
*Liberty > Equality & Social Order*
reg Liberty_Q10 Prime_Liberty, r
margins, dydx(Prime_Liberty) saving(m4, replace)
*Liberty > Economic Security & Social Order*
reg Liberty_Q12 Prime_Liberty, r
margins, dydx(Prime_Liberty) saving(m5, replace)
*Liberty > Morality & Social Order*
reg Liberty_Q13 Prime_Liberty, r
margins, dydx(Prime_Liberty) saving(m6, replace)

*Equality > Economic Security & Liberty*
reg Equality_Q4 Prime_Equality, r
margins, dydx(Prime_Equality) saving(m7, replace)
*Equality > Morality & Social Order*
reg Equality_Q5 Prime_Equality, r
margins, dydx(Prime_Equality) saving(m8, replace)
*Equality > Liberty & Morality*
reg Equality_Q8 Prime_Equality, r
margins, dydx(Prime_Equality) saving(m9, replace)
*Equality > Economic Security & Social Order*
reg Equality_Q9 Prime_Equality, r
margins, dydx(Prime_Equality) saving(m10, replace)
*Equality > Liberty & Social Order*
reg Equality_Q10 Prime_Equality, r
margins, dydx(Prime_Equality) saving(m11, replace)
*Equality > Economic Security & Morality*
reg Equality_Q11 Prime_Equality, r
margins, dydx(Prime_Equality) saving(m12, replace)

*Economic Security > Equality & Liberty*
reg Econ_Q4 Prime_Econ, r
margins, dydx(Prime_Econ) saving(m13, replace)
*Economic Security > Morality & Social Order*
reg Econ_Q6 Prime_Econ, r
margins, dydx(Prime_Econ) saving(m14, replace)
*Economic Security > Liberty & Morality*
reg Econ_Q7 Prime_Econ, r
margins, dydx(Prime_Econ) saving(m15, replace)
*Economic Security > Equality & Social Order*
reg Econ_Q9 Prime_Econ, r
margins, dydx(Prime_Econ) saving(m16, replace)
*Economic Security > Equality & Morality*
reg Econ_Q11 Prime_Econ, r
margins, dydx(Prime_Econ) saving(m17, replace)
*Economic Security > Liberty & Social Order*
reg Econ_Q12 Prime_Econ, r
margins, dydx(Prime_Econ) saving(m18, replace)

*Morality > Equality & Social Order*
reg Morality_Q5 Prime_Morality, r
margins, dydx(Prime_Morality) saving(m19, replace)
*Morality > Economic Security & Social Order*
reg Morality_Q6 Prime_Morality, r
margins, dydx(Prime_Morality) saving(m20, replace)
*Morality > Economic Security & Liberty*
reg Morality_Q7 Prime_Morality, r
margins, dydx(Prime_Morality) saving(m21, replace)
*Morality > Equality & Liberty*
reg Morality_Q8 Prime_Morality, r
margins, dydx(Prime_Morality) saving(m22, replace)
*Morality > Economic Security & Equality*
reg Morality_Q11 Prime_Morality, r
margins, dydx(Prime_Morality) saving(m23, replace)
*Morality > Liberty & Social Order*
reg Morality_Q13 Prime_Morality, r
margins, dydx(Prime_Morality) saving(m24, replace)

*Social Order > Equality & Morality*
reg Order_Q5 Prime_Order, r
margins, dydx(Prime_Order) saving(m25, replace)
*Social Order > Economic Security & Morality*
reg Order_Q6 Prime_Order, r
margins, dydx(Prime_Order) saving(m26, replace)
*Social Order > Economic Security & Equality*
reg Order_Q9 Prime_Order, r
margins, dydx(Prime_Order) saving(m27, replace)
*Social Order > Equality & Liberty*
reg Order_Q10 Prime_Order, r
margins, dydx(Prime_Order) saving(m28, replace)
*Social Order > Economic Security & Liberty*
reg Order_Q12 Prime_Order, r
margins, dydx(Prime_Order) saving(m29, replace)
*Social Order > Liberty & Morality*
reg Order_Q13 Prime_Order, r
margins, dydx(Prime_Order) saving(m30, replace)

*Liberty = LIB
*Equality = EQU
*Morality = MOR
*Economic Security = ECS
*Social Order = SOR
 
combomarginsplot m1 m2 m3 m4 m5 m6 m7 m8 m9 m10 ///
m11 m12 m13 m14 m15 m16 m17 m18 m19 m20 ///
m21 m22 m23 m24 m25 m26 m27 m28 m29 m30, ///
labels("LIB > ECS & EQU" "LIB > ECS & MOR" "LIB > EQU & MOR" ///
"LIB > EQU & SOR" "LIB > ECS & SOR" "LIB > MOR & SOR" ///
"EQU > ECS & LIB" "EQU > MOR & SOR" "EQU > LIB & MOR" ///
"EQU > ECS & SOR" "EQU > LIB & SOR" "EQU > ECS & MOR" ///
"ECS > EQU & LIB" "ECS > MOR & SOR" "ECS > LIB & MOR" ///
"ECS > EQU & SOR" "ECS > EQU & MOR" "ECS > LIB & SOR" ///
"MOR > EQU & SOR" "MOR > ECS & SOR" "MOR > ECS & LIB" ///
"MOR > EQU & LIB" "MOR > ECS & EQU" "MOR > LIB & SOR" ///
"SOR > EQU & MOR" "SOR > ECS & MOR" "SOR > ECS & EQU" ///
"SOR > EQU & LIB" "SOR > ECS & LIB" "SOR > LIB & MOR") horizontal


